//
//  NSObject+Property.m
//  RunTime
//
//  Created by 吴志勇 on 2020/3/23.
//  Copyright © 2020 wzy. All rights reserved.
//

#import "NSObject+Property.h"
#import <objc/message.h>


#if TARGET_OS_MACCATALYST
    #import <AppKit/AppKit.h>
#endif 


@implementation NSObject (Property)

- (void)setName:(NSString *)name{
    objc_setAssociatedObject(self, @"name", name, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (NSString *)name{
    return objc_getAssociatedObject(self, @"name");
}

@end
